package com.LA_houseLease.common.utils;

import java.util.Random;

/**
 * 验证码工具类
 */
public class CodeUtil {

    public static String getRandomCode(int length){
        StringBuilder stringBuilder = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            stringBuilder.append(random.nextInt(10));
        }
        return stringBuilder.toString();
    }

}
